/*
 * Array.h
 *
 *  Created on: 11/11/2011
 *      Author: marcio
 */

#ifndef ARRAY_H_
#define ARRAY_H_

#include <stdio.h>
#include <stdlib.h>

typedef struct a{
	void** elem;
	long size;
} Array;

Array* array_newArray(long size);

void* array_getElem(Array* a, long i);

int array_setElem(Array* a, long i, void* newElem);

int array_putElem(Array* a, void* newElem);

int array_Order(Array* a, int (*function)(const void*,const void*));

int array_isEmpty(Array* a);

int array_searchFor(Array* a, void* elem, int (*isEqual)(void*, void*));

int array_delete(Array* a);

#endif /* ARRAY_H_ */
